<template>
	<view><jinEdit placeholder="请输入内容" @editOk="editOk" :html='goodsDetailsJson' :images='images'  uploadFileUrl="/#"></jinEdit></view>
</template>

<script>
import jinEdit from '../../../components/jin-edit/jin-edit.vue';
export default {
	data() {
		return {
			goodsDetailsJson: '',
			images:[]
		};
	},
	components: {
		jinEdit
	},
	onLoad(option) {
		
		this.goodsDetailsJson=JSON.parse(decodeURIComponent(option.goodsDetailsJson))
		
	},
	onShow() {
		uni.$once('goodsDetailsJson', (data) => {
			if (data.length > 0) {
				this.images=data
				
			}
		});
	},
	methods: {
		// 点击发布
		editOk(res) {
			console.log(res, 456);
			this.goodsDetailsJson = res.html;
			uni.$emit('goodsDetailsJson', this.goodsDetailsJson);
			uni.navigateBack();
		}
	}
};
</script>

<style></style>
